on novel data. A straightforward benefit of this analysis is to

question that how many data points are within or beyond the

ce bands. Two regression models are shown in Figure 4.10. They

ferent confidence bands. One model had more data points beyond

dence bands compared with the other model.

(a) (b)

Fig. 4.10. The confidence bands of two regression models.

unction for ordinary linear regression analysis

ruct an OLR model for a data set, three R functions are needed.

lm, summary and predict. The R function for constructing

model is lm, which is formatted as below, where x is an

ent variable and y is a dependent variable,

model=lm(y x,···)

ow how this function works, the olive oil content data [Barazani,

17] was used for the demonstration at first. The data examined

roduction quality from different olive trees in the southeast

anean area. The data was composed of five independent variables.

mple illustration, only one of them was used for an easy

on of how a linear regression model works. The variable used

s the stone weight. Therefore, this was a univariate linear

n analysis problem. A lm object is composed of multiple

One of them is called fitted.values which corresponds to